package(default_visibility=["//visibility:public"])

load("@io_bazel_rules_sass//:defs.bzl", "sass_library", "sass_binary")
load("//tools:defaults.bzl", "ng_module", "ng_test_library", "ng_web_test_suite",
  "markdown_to_html")

ng_module(
  name = "button",
  srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
  module_name = "@angular/material/button",
  assets = [":button.css"] + glob(["**/*.html"]),
  deps = [
    "@angular//packages/common",
    "@angular//packages/core",
    "@angular//packages/platform-browser/animations",
    "//src/cdk/platform",
    "//src/cdk/a11y",
    "//src/lib/core",
  ],
)

sass_library(
  name = "button_scss_lib",
  srcs = glob(["**/_*.scss"]),
  deps = ["//src/lib/core:core_scss_lib"],
)

sass_binary(
  name = "button_scss",
  src = "button.scss",
  deps = [
    "//src/cdk/a11y:a11y_scss_lib",
    "//src/lib/core:core_scss_lib",
    ":button_scss_lib"
  ],
)

ng_test_library(
  name = "button_test_sources",
  srcs = glob(["**/*.spec.ts"]),
  deps = [
    "@angular//packages/platform-browser",
    "//src/lib/core",
    ":button"
  ]
)

ng_web_test_suite(
  name = "unit_tests",
  deps = [":button_test_sources"],
)

markdown_to_html(
  name = "overview",
  srcs = [":button.md"],
)

filegroup(
  name = "source-files",
  srcs = glob(["**/*.ts"]),
)
